import { config } from 'setting'
import { request } from 'utils'

const { call = {} } = config
// 将开发者接口IP相对应字段赋值给一个变量即可
const developer = call.shuzhang || ''

export function queryTable ({ filterParams = {}, pageIn = {} }) {
  const params = {
    ...filterParams,
    pageIn,
  }
  return request({
    url: `${developer}/usertest/getUserInfo`,
    method: 'post',
    data: params,
  })
}

export function queryTree (params) {
  return request({
    url: `${developer}/usertest/getdeptTree`,
    data: params,
  })
}

export function add (params) {
  return request({
    url: `${developer}/usertest/addUserInfo`,
    data: params,
  })
}

export function del (params) {
  return request({
    url: `${developer}/usertest/deleteUserInfo`,
    data: params,
  })
}

export function edit (params) {
  return request({
    url: `${developer}/usertest/updateUserInfo`,
    data: params,
  })
}